import type { ModalProps } from "@arco-design/web-react";
import type { PropsWithChildren } from "react";

export type ModalContainerProps = PropsWithChildren<
	Pick<ModalProps, "title" | "okText" | "cancelText" | "onOk"> & {
		width?: number;
		okLoading?: boolean;
		onCancel?: () => void;
		onClose?: () => void;
	}
>;

export type FormModalProps<TModel extends object | undefined> = Omit<
	ModalContainerProps,
	"onOk" | "onClose"
> & {
	initialValues?: Partial<TModel>;
	onSubmit: (values: TModel) => void;
};
